<template>
	<view class="bigBox">
		<u-navbar :autoBack="true" leftIconColor='#fff' bgColor='transparent'>
		</u-navbar>
		<view class="cover">
			<image :src="fmSrc?fmSrc:'../../static/myBj.png'"></image>
			<view>
				<u-upload :fileList="fileList1" @afterRead="afterRead" name="1" multiple :maxCount="1">
					<view class="fm">更改封面</view>
				</u-upload>
			</view>
		</view>
		<view class="userBox">
			<u-avatar :src="src" shape="circle" :size='"120rpx"'></u-avatar>
			<view class="nameBox">
				<view class="name">王者叫唤师</view>
				<view class="bqBox">
					<template v-for="item in bqList">
						<view class="bq">{{item}}</view>
					</template>
				</view>
			</view>
			<view class="editData" @click="goEdit">
				<image style="width: 40rpx;height: 40rpx;" src="@/static/icon/edit.png"></image>
				<text>编辑资料</text>
			</view>
		</view>
		<view class="introduce">
			王者荣耀资深叫唤师，长期活跃于青铜白银段位，技术从未退步王者荣耀资深叫唤师，长期活跃于青铜白银段位，技术从未退步王者荣耀资深叫唤师，长期活跃于青铜白银段位，技术从未退步
		</view>
		<view class="label">
			<template v-for="(item,index) in labelList">
				<view class="bq">{{item}}</view>
				<view class="bq" v-if="index==labelList.length-1">···</view>
			</template>
		</view>
		<view class="myZl">
			<view class="like">
				<template v-for="item in myList">
					<view class="Box">
						<text class="number">{{item.number}}</text>
						<text class="text">{{item.name}}</text>
					</view>
				</template>
			</view>
		</view>
		<view class="shop">
			<image src="@/static/icon/myshop.png"></image>
			<view class="textBox">
				<view class="title">商品清单</view>
				<text>18件商品 · 28391销量 · 12983评价</text>
			</view>
			<view class="management">管理</view>
		</view>
		<view class="dynamic">
			<view class="dynamicTitle">
				动态 <text class="number">{{videoList.length}}</text>
			</view>
			<template v-for="(item,index) in videoList">
				<view class="videoBox">

					<u-swiper class='video' :list="[item]" height='500rpx' :autoplay="false" radius='10'></u-swiper>

					<!-- <video src="https://www.zwhero.com/Upload/video/share_ae13f11878d0b1551e854143ce8fc97d.mp4"></video> -->
					<view class="videoUser">
						<u-avatar :src="item.address" shape="circle" :size='"68rpx"'></u-avatar>
						<view class="name">{{item.name}}</view>
						<view class="timer">{{item.time}}</view>
					</view>
					<view class="introduction">
						{{item.introduce}}
					</view>
					<view class="function">
						<view class="iconBox">
							<image src="@/static/icon/mylike.png"></image>
							<text>{{item.likeNumber}}</text>
						</view>
						<view class="iconBox">
							<image src="@/static/icon/mylook.png"></image>
							<text>{{item.browseNumber}}</text>
						</view>
						<view class="del">删除</view>
					</view>
				</view>
			</template>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				fmSrc:'',
				src: 'https://cdn.uviewui.com/uview/album/7.jpg',
				bqList: ['男', '3岁', '广州'],
				labelList: ['夫妻辩论赛冠军', '有为青年', '国家级专业抬杠选手'],
				videoList: [{
					url: 'https://cdn.uviewui.com/uview/resources/video.mp4',
					title: '昨夜星辰昨夜风，画楼西畔桂堂东',
					poster: 'https://cdn.uviewui.com/uview/album/7.jpg',
					time: '30分钟前',
					name: '王者交换式',
					address: 'https://cdn.uviewui.com/uview/album/7.jpg',
					likeNumber: 10002,
					browseNumber: 215102,
					introduce: '王者荣耀资深叫唤师，长期活跃于青铜白银段位，技术从未退步王者荣耀资深叫唤师，长期活跃于青铜白银段位，技术从未退步王者荣耀资深叫唤师，长期活跃于青铜白银段位，技术从未退步'
				}],
				myList: [{
					name: '动态',
					number: 2082
				}, {
					name: '粉丝',
					number: 2082
				}, {
					name: '关注',
					number: 2082
				}, {
					name: '喜欢',
					number: 2082
				}],
				fileList1:[]
			}
		},
		methods: {
			afterRead(event){
				this.fmSrc = event.file[0].url
			},
			goEdit() {
				uni.navigateTo({
					url: '/pages/my/editData'
				})
			}
		}
	}
</script>

<style>
	.bigBox {
		width: 750rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		background-color: #252b47;
		padding-bottom: 40rpx;
	}

	.bq {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		margin-right: 20rpx;
		height: 48rpx;
		border-radius: 8rpx;
		background-color: #0C1332;
		color: rgba(190, 199, 209, 100);
		font-size: 24rpx;
		line-height: 48rpx;
		padding: 0rpx 20rpx;
		text-align: center;
		border: 2rpx solid #0C1332;

	}
</style>
<style lang="less">
	.dynamic {
		width: 670rpx;
		margin-top: 40rpx;

		.dynamicTitle {
			color: rgba(255, 255, 255, 100);
			font-size: 36rpx;

			.number {
				margin-left: 20rpx;
				color: rgba(190, 199, 209, 100);
				font-size: 24rpx;
			}
		}

		.videoBox {
			width: 670rpx;
			margin-bottom: 30rpx;

			.video {
				margin-top: 44rpx;
				margin-bottom: 10rpx;
				/* width: 670rpx;
					height: 500rpx;
					border-radius: 10rpx; */
			}


			.videoUser {
				display: flex;
				align-items: center;
				justify-content: space-between;

				.name {
					width: 460rpx;
					font-weight: 700;
					color: white;
					font-size: 28rpx;
				}

				.timer {
					color: rgba(190, 199, 209, 100);
					font-size: 12px;
				}
			}

			.introduction {
				text-indent: 1em;
				width: 670rpx;
				margin-top: 20rpx;
				color: #fff;
				font-size: 28rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				/* autoprefixer: off */
				-webkit-box-orient: vertical;
				/* autoprefixer: on */
				-webkit-line-clamp: 2;
			}

			.function {
				position: relative;
				margin-top: 20rpx;
				width: 670rpx;
				height: 40rpx;
				color: #BEC7D1;
				display: flex;
				align-items: center;
				font-size: 24rpx;

				.iconBox {
					display: flex;
					align-items: center;
					height: 40rpx;
					margin-right: 20rpx;

					image {
						width: 40rpx;
						height: 40rpx;
					}

					text {
						margin-left: 10rpx;
					}
				}

				.del {
					position: absolute;
					right: 0;
				}
			}
		}
	}

	.shop {
		width: 670rpx;
		height: 120rpx;
		background-color: #0C1332;
		border-radius: 8rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;

		image {
			margin-left: 20rpx;
			width: 80rpx;
			height: 80rpx;
			border-radius: 10rpx;
		}

		.textBox {
			height: 80rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-between;

			.title {
				font-weight: 700;
				color: rgba(255, 255, 255, 100);
				font-size: 28rpx;
			}

			text {
				color: rgba(190, 199, 209, 100);
				font-size: 24rpx;
			}
		}

		.management {
			width: 180rpx;
			height: 120rpx;
			line-height: 120rpx;
			border-radius: 0px 8rpx 8rpx 0px;
			background-color: rgba(255, 78, 95, 100);
			color: rgba(255, 255, 255, 100);
			font-size: 28rpx;
			text-align: center;
		}
	}

	.label {
		margin-top: 40rpx;
		width: 670rpx;
		display: flex;
	}

	.myZl {
		width: 670rpx;
		height: 160rpx;
		// background-color: #0C1332;
		border-radius: 20rpx;
		overflow: hidden;
		color: white;

		.like {
			height: 160rpx;
			display: flex;
			align-items: center;
			justify-content: space-around;

			.Box {
				display: flex;
				flex-direction: column;
				align-items: center;

				.number {
					font-weight: 700;
					color: rgba(255, 255, 255, 100);
					font-size: 36rpx;
				}

				.text {
					color: rgba(190, 199, 209, 100);
					font-size: 24rpx;
				}
			}
		}
	}

	.introduce {
		width: 670rpx;
		margin-top: 40rpx;
		color: rgba(190, 199, 209, 100);
		font-size: 24rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		/* autoprefixer: off */
		-webkit-box-orient: vertical;
		/* autoprefixer: on */
		-webkit-line-clamp: 2;
	}

	.userBox {
		margin-top: 60rpx;
		width: 670rpx;
		height: 120rpx;
		display: flex;
		align-items: flex-end;
		justify-content: space-between;

		.nameBox {
			width: 300rpx;

			.name {
				color: rgba(255, 255, 255, 100);
				font-size: 28rpx;
				font-weight: 700;
			}

			.bqBox {
				margin-top: 20rpx;

				display: flex;


			}
		}

		.editData {
			display: flex;

			text {
				margin-left: 10rpx;
				font-weight: 700;
				color: rgba(255, 255, 255, 100);
				font-size: 28rpx;
			}
		}
	}

	.cover {
		position: relative;
		width: 750rpx;
		height: 354rpx;

		image {
			width: 750rpx;
			height: 354rpx;
		}

		.fm {
			position: absolute;
			bottom: 50rpx;
			right: 20rpx;
			width: 210rpx;
			height: 80rpx;
			line-height: 80rpx;
			border-radius: 8rpx;
			background-color: rgba(0, 4, 17, 0.7);
			color: rgba(255, 255, 255, 100);
			font-size: 24rpx;
			text-align: center;
			border: 2rpx solid rgba(0, 4, 17, 100);
		}
	}
</style>
